<?
$r = $args['release'];
$bmArray = $r->getReleaseBandMembers();
$gpArray = $r->getReleaseGuestPerformers();
$performances = array();
foreach($bmArray as $bm) {
	$bmt = new SectionTemplate;
	$bmt->file = "performer.php";
	$bmt->args['performer'] = $bm;
	$performances[] = $bmt;
}
foreach($gpArray as $gp) {
	$bmt = new SectionTemplate;
	$bmt->file = "performer.php";
	$bmt->args['performer'] = $gp;
	$performances[] = $bmt;
}
$releaseTracks = $r->getReleaseTracks();
foreach($releaseTracks as $rt) {
	$rtt = new SectionTemplate;
	$rtt->file = "release_track_summary.php";
	$rtt->args['track'] = $rt;
	$tracks[] = $rtt;
}
$title = $r->getTitle();
$subTitle = $r->getSubTitle();
$date = $r->getDate('F d, Y');
$notes = $r->getNotes();
$pressNotes = $r->getPressNotes();

$photoArea = $r->getPhotoAreaObject();
if (!db::isError($photoArea)) {
	$numPhotos = $photoArea->getNumFiles();
	if ($numPhotos > 0) {
		$photos = new SectionTemplate;
		$photos->file = "gallery.php";
		$photos->args['area'] = &$photoArea;
		if (USE_MOD_REWRITE) {
			$photos->args['url'] = '/release/' . $r->getID() . '/';
		} else {
			$photos->args['url'] = '/releases.php?id=' . $r->getID();
		}
	}
}

$avArea = $r->getAVAreaObject();
if (!db::isError($avArea)) {
	$numAudio = $avArea->getNumFiles();
	if ($numAudio > 0) {
		$av = new SectionTemplate;
		$av->file = "media_list.php";
		$av->args['area'] = &$avArea;
		if (USE_MOD_REWRITE) {
			$av->args['url'] = '/release/' . $r->getID() . '/';
		} else {
			$av->args['url'] = '/releases.php?id=' . $r->getID();
		}
	}
}
?>